<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="true">
  <head>  
    <title>编辑/新增</title>
    <%@ include file="../link_script.jsp" %>
    <script type="text/javascript">
    $(function() { 
      $("form").validity(function() {
        $("#presentName").require();
        $("#presentExpenses").require();
      });
    });
  </script>
  </head>
<body> 
<form action="present.do?method=editPresent_Do&pageNum=${pageNum}" method="post" target="_self">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_add.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#b5d6e6">       
          <tr>
            <td width="100%" class="STYLE32">编辑商品</td>
          </tr>
          <tr>
            <td class="STYLE1"><table width="100%" border="0" bordercolor="#b5d6e6" cellpadding="0" cellspacing="0">
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;商品名称 : </td>
                <td class="STYLE11"><input type="text" id="presentName" name="presentName" value="${present.presentName}" size="60" title="商品名称不能为空" />
                &nbsp;<font color="red">*</font></td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;使用类型 : </td>
                <td class="STYLE11">
                <select id="presentType" name="presentType">
                  <c:if test="${present.presentType=='1'}">                  
                  <option value="1">食品茶饮</option>
                  <option value="0">服饰鞋帽</option>
                  <option value="2">日常用品</option>
                  <option value="3">数码家电</option>
                  <option value="5">其它</option></c:if>
                  <c:if test="${present.presentType=='0'}">     
                  <option value="0">服饰鞋帽</option>             
                  <option value="1">食品茶饮</option>
                  <option value="2">日常用品</option>
                  <option value="3">数码家电</option>
                  <option value="5">其它</option></c:if>
                  <c:if test="${present.presentType=='2'}">     
                  <option value="2">日常用品</option>             
                  <option value="1">食品茶饮</option>
                  <option value="0">服饰鞋帽</option>
                  <option value="3">数码家电</option>
                  <option value="5">其它</option></c:if>   
                  <c:if test="${present.presentType=='3'}">     
                  <option value="3">数码家电</option>             
                  <option value="1">食品茶饮</option>
                  <option value="2">日常用品</option>
                  <option value="0">服饰鞋帽</option>
                  <option value="5">其它</option></c:if>
                  <c:if test="${present.presentType=='5'}">     
                  <option value="5">其它</option>             
                  <option value="1">食品茶饮</option>
                  <option value="2">日常用品</option>
                  <option value="0">服饰鞋帽</option>
                  <option value="3">数码家电</option></c:if>                      
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;状态 : </td>
                <td class="STYLE11">
                <select id="presentState" name="presentState">
                  <c:if test="${present.presentState=='1'}">                  
                  <option value="1">未用</option>
                  <option value="0">已用</option></c:if>
                  <c:if test="${present.presentState=='0'}">     
                  <option value="0">已用</option>             
                  <option value="1">未用</option></c:if>                   
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;购买日期 : </td>
                <td class="STYLE11"><input type="text" id="presentDate" name="presentDate" value="${present.presentDate}" size="20" />&nbsp;<font color="red">*</font>&nbsp; 购买日期，购买日期在结算时作为流水账的记账日期</td>
              </tr>
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;费用: </td>
                <td class="STYLE11">
                <c:if test="${present.presentPay=='1'}">
                <input type="text" id="presentExpenses" name="presentExpenses" value="${present.presentExpenses}" size="20" title="费用不能为空" />&nbsp;￥&nbsp;<font color="red">*</font>
                </c:if>
                <c:if test="${present.presentPay=='0'}">
                <input type="text" id="presentExpenses" name="presentExpenses" value="${present.presentExpenses}" size="20" title="费用不能为空" readonly />&nbsp;￥&nbsp;<font color="red">*</font>
                </c:if></td>
              </tr> 
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;卖家 : </td>
                <td class="STYLE11">
                <select id="shopID" name="shopID" onchange="javascript:change();">
                  <option value="${present.shopID}">${shopName}</option>
                  <option disabled="disabled">------</option>
                  <c:if test="${!empty shopList}">
                    <c:forEach items="${shopList}" var="s">
                      <option value="${s.shopID}">${s.shopName}</option>
                  </c:forEach></c:if></select></td>
              </tr>           
              <tr>
                <td class="STYLE51">&nbsp;&nbsp;描述 : </td>
                <td class="STYLE11"><textarea id="presentDesc" name="presentDesc" cols="54" rows="4" style="font-family:宋体;font-size:12px">${present.presentDesc}</textarea></td>
              </tr>
              <tr>
                <td class="STYLE51" width="8%">&nbsp;&nbsp;</td>
                <td class="STYLE11"><input type=hidden id="presentID" name="presentID" value="${present.presentID}" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td class="STYLE12"><input type="submit" value="提交"/><input type="reset" value="取消"/></td>
          </tr>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
</table>
</form>
</body>
</html>
